package com.mabs.ground.client.module.mod1.view;

import com.google.gwt.core.client.GWT;
import com.google.gwt.dom.client.SpanElement;
import com.google.gwt.event.dom.client.HasClickHandlers;
import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.uibinder.client.UiField;
import com.google.gwt.user.client.ui.Anchor;
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.Widget;

/**
 * @author <a href="Email: mohamedarbi.benslimane@allence-tunisie.com">Ben
 *         Slimane Arbi</a>
 * @version 1.0
 * @since 1.0 - 25 juil. 2014 - 19:59:50
 */
public class HelloViewImpl extends Composite implements HelloView {
	private static HelloViewImplUiBinder uiBinder = GWT
			.create(HelloViewImplUiBinder.class);

	interface HelloViewImplUiBinder extends UiBinder<Widget, HelloViewImpl> {
	}

	@UiField
	SpanElement nameSpan;
	@UiField
	Anchor goodbyeLink;
	private String name;

	public HelloViewImpl() {
		initWidget(uiBinder.createAndBindUi(this));
	}

	public void setName(String name) {
		this.name = name;
		nameSpan.setInnerText(this.name);
	}

	public HasClickHandlers getGoodbyeLinkClickHandlers() {
		return goodbyeLink;
	}

}
